# encoding: utf-8
"""
@author: youfeng
@file: mq_factory.py
@time: 2018/9/1 上午9:18
"""

# 消息队列生成工厂
from config.mq_conf import GsxtClueBeanstalkConf, OfflineBeanstalkConf
from mq.beanstalk_handler import BeanstalkHandler


class MQFactory(object):

    # 获得工商线索消息队列句柄
    @staticmethod
    def get_gsxt_clue_beanstalk_handler(log):
        return BeanstalkHandler(GsxtClueBeanstalkConf.HOST, GsxtClueBeanstalkConf.PORT, log)

    # 获得离线采集消息队列
    @staticmethod
    def get_offline_beanstalk_handler(log):
        return BeanstalkHandler(OfflineBeanstalkConf.HOST, OfflineBeanstalkConf.PORT, log)
